<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: view-smoothbox.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>
  
<?php
if (!$this->participant || $this->participant->status != 1):
  echo $this->translate('The video you are looking for does not exist or has not been processed yet.');
  return;
endif;
?>

<?php
  if( $this->participant->ptype == 3 ):
  $this->headScript()->appendFile($this->baseUrl() . '/externals/flowplayer/flashembed-1.0.1.pack.js');
?>
  <script type='text/javascript'>

    flashembed("video_embed",
    {
      src: "<?php echo $this->baseUrl()?>/externals/flowplayer/flowplayer-3.1.5.swf",
      width: 480,
      height: 386,
      wmode: 'transparent'
    },
    {
      config: {
        clip: {
          url: "<?php echo $this->video_location;?>",
          autoPlay: false,
          duration: "<?php echo $this->participant->duration ?>",
          autoBuffering: true
        },
        plugins: {
          controls: {
            background: '#000000',
            bufferColor: '#333333',
            progressColor: '#444444',
            buttonColor: '#444444',
            buttonOverColor: '#666666'
          }
        },
        canvas: {
          backgroundColor:'#000000'
        }
      }
    });
    
  </script>
<?php endif;?>
  
<div class="vote_photo_participant">
  <div>
    <div>            
      <?php if ($this->participant->type == 3): ?>
        <div id="video_embed" class="participant_video_embed video-type-<?php echo $this->participant->type; ?>"></div>
      <?php else: ?>
        <div class="participant_video_embed video-type-<?php echo $this->participant->type; ?>">
          <?php echo $this->videoEmbedded ?>
        </div>
      <?php endif; ?>
    </div>
    <div class="ratings">
      <?php echo $this->objectRate($this->participant, $this->canVote); ?>
    </div>
  </div>
</div>